/**
 * Created by zhangweiming on 2015/5/15.
 */
var $countEle = $('#countDown'),$backIndex = $('#backindex').attr('href'),$timerNum = 5,$timer=0;
var countdown =function(){

    $countEle.html($timerNum);
    $timerNum = $timerNum - 1;
    if($timerNum < 0){
        clearTimeout($timer);
        window.location.href = $backIndex;
    } else {
        $timer = setTimeout(countdown,1000);
    }

}

$timer = setTimeout(countdown,1000);
